package edu.gznu.ics.fast.pulsar.model.vo.user;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by Y on 2016/7/26.
 */
public class TdUserVO {
    public TdUserVO(String userName) {
        this.userName = userName;
    }

    public TdUserVO() {

    }

    private String roleIds; //拥有的角色列表;

    public String getRoleIds() {
        return roleIds;
    }

    public void setRoleIds(String roleIds) {
        this.roleIds = roleIds;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    private long userId;
    private String salt;
    @Length(min=3, max=15, message="User name length range = 3-15")
    private String userName;

    @NotEmpty(message="Customer不能为空")
    private String userPasswd;

    public String getUserPasswd() {
        return userPasswd;
    }

    public void setUserPasswd(String userPasswd) {
        this.userPasswd = userPasswd;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getCredentialsSalt() {
        return userName + salt;
    }

}
